package com.beiing.tianshuai.tianshuai.entity;

import android.content.Context;

import com.beiing.tianshuai.tianshuai.util.SPUtils;

/**
 * Created by Jinni on 2017/7/16 0016.
 * <p>
 * 获取用户的基本信息
 */

public class UserInfoBean {

    public static String getUid(Context context) {
        return SPUtils.getString(context, "uid", "");
    }

    public static String getNickName(Context context) {
        return SPUtils.getString(context, "name", "");
    }

    public static String getAvatar(Context context) {
        return SPUtils.getString(context, "photo", "");
    }

    public static String getUniversity(Context context) {
        return SPUtils.getString(context, "unit", "");
    }

    public static String getSign(Context context) {
        return SPUtils.getString(context, "sign", "");
    }

    public static String getPass(Context context) {
        return SPUtils.getString(context, "pass", "123");
    }

    public static String getAttestation(Context context) {
        return SPUtils.getString(context, "identification_status", "1");
    }

    public static String getOtherAvatar(Context context, String uid) {
        return SPUtils.getString(context, "avatar" + uid, "1.jpg");
    }

    /**
     * 获取当前用户的手机号码
     *
     * @param context context
     * @return 电话号码
     */
    public static String getUserTel(Context context) {
        return SPUtils.getString(context, "tel", "");
    }

    /**
     * 获取当前用户网易云信的token
     *
     * @param context context
     * @return token
     */
    public static String getUserToken(Context context) {
        return SPUtils.getString(context, "token", "");
    }
}
